Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance: Rework playback to use Player.Open #1215

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

wutschel
Copy link
Collaborator

Description

This PR finishes the work started in #1200 and reworks / re-implements the way of how playback of items is started. Before, items were first added to a playlist (Playlist.Clear, Playlist.Add), then the playback was started for this playlist (Player.Open for playlist id and playlist index).

There were already exceptions to this approach when resuming, when starting a slideshow, when starting playback for PVR channels or streams or when starting playback to a UPnP renderer. After this rework the playback is always started by a common Player.Open command for a given item, using options which cover the shuffle mode as well as UPnP.

Along with this change the behaviour of play/queue in the album view is made consistent. Selecting play/queue on a track will always only process the selected track, selecting play/queue on the album will process the whole album.

Summary for release notes

Maintenance: Rework playback to use Player.Open
Improvement: Consistent behaviour of play/queue in album view

@wutschel wutschel force-pushed the rework_playeropen branch 3 times, most recently from 4bfc8ba to d5786a8 Compare December 25, 2024 20:06
Avoid to use Playlist.Clear, Playlist.Add and starting to play a playlist index. Instead, directly call Player.Open with the item, which then allows to resume the position via API. As Player.Open anyway will clear and update the playlist, this is a much simpler and more robust way to start or resume the playback.
Check support of Playlist.Insert/.Add for recordings is not required when starting a slideshow, as this does not use any Playlist API anymore.
This is now done purely by calling Player.Open, and not by updating a playlist and playing from the desired playlist index.
Video addons can now be processed by the default logic, as also Player.Open is used.
"Play using..." can now be processed by the default logic, as also Player.Open is used.
Live TV / Radio can now be processed by the default logic inside buildPlaylistItems.
This enables the activity indicator.
Only either indexPath or the ActivityIndicator is needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant